import {ScreenSpaceEventType, Viewer} from "cesium";
import {createEventHandler, createEventRegister} from "yt-cesium";


const leftEventMap: WeakMap<Viewer, Set<Function>> = new WeakMap();

/**
 * 注册单击事件
 * @param fn
 * @param opt
 */
export const onLeftClick = /*#__PURE__*/createEventRegister(leftEventMap)

/**
 * 开启单击事件
 * @param viewer
 */
export const handleLeftClickEventByViewer = /*#__PURE__*/createEventHandler(leftEventMap, ScreenSpaceEventType.LEFT_CLICK)